﻿<my:CreateNewObjectDialogBase 
        x:TypeArguments="data:CapSign"
        x:Class="winNewSign"
        xmlns:data="clr-namespace:Caps.Data;assembly=Caps.Common"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:res="clr-namespace:Caps.Console.My.Resources"
        xmlns:my="clr-namespace:Caps.Console"
        xmlns:convertersT="clr-namespace:Tools.WindowsT.WPF.ConvertersT;assembly=Tools.Windows"
        Title="{x:Static res:Resources.txt_NewSign}" Height="222" Width="373" SizeToContent="Height" MinWidth="300"
        ShowInTaskbar="False" Icon="{x:Null}"
        FocusManager.FocusedElement="{Binding ElementName=txtName}">
    <my:CreateNewObjectDialogBase.Resources>
        <convertersT:CachedImageConverter x:Key="CachedImageConverter"/>
    </my:CreateNewObjectDialogBase.Resources>
    <Grid>
        <Grid.ColumnDefinitions >
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Label Grid.Column="0" Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{x:Static res:Resources.lbl_Name}"/>
        <TextBox Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center" Name="txtName" Grid.ColumnSpan="2" MaxLength="50" />

        <Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Top" Content="{x:Static res:Resources.lbl_Description}"/>
        
        <TextBox Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextWrapping="Wrap" AcceptsReturn="True" MinLines="3" Name="txtDescription" Grid.ColumnSpan="2" />
        <Label Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{x:Static res:Resources.lbl_Image}"/>
        <TextBox Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Name="txtImagePath" />
        <Button Grid.Column="2" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Name="btnImage" Content="{x:Static res:Resources.cmd_Browse}" ToolTip="{x:Static res:Resources.tot_Browse}"/>
        
        <Image Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="3" HorizontalAlignment="Center" MaxWidth="32" MaxHeight="32" Source="{Binding ElementName=txtImagePath, Path=Text, Mode=OneWay, Converter={StaticResource CachedImageConverter}}"/>
        
        <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="4">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions >
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button Name="btnOK" IsDefault="True" Grid.Column="0" Grid.Row="0" Padding="3,0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="auto" Content="{x:Static res:Resources.cmd_OK}"/>
            <Button Name="btnCancel" IsCancel="True" Grid.Column="1" Grid.Row="0" Padding="3,0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="auto" Content="{x:Static res:Resources.cmd_Cancel}"/>
        </Grid>
    </Grid>
</my:CreateNewObjectDialogBase>
